package com.github.cooingandwooing.uaa.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import com.github.cooingandwooing.uaa.util.Constants;

import org.springframework.security.access.prepost.PreAuthorize;

@Retention(RetentionPolicy.RUNTIME)
@PreAuthorize("hasRole('" +
    Constants.AUTHORITY_ADMIN +
    "') and authentication.name != #username")
public @interface RoleAdminNotSelf {
}
